

import { Button, Checkbox, Form, Input } from "antd";
import { Select } from "antd";
import { SearchOutlined, UndoOutlined } from "@ant-design/icons";
import { DatePicker } from "antd";

function Search(props) {
  const { RangePicker } = DatePicker;

    const {rest,onFinish,onFinishFailed,handleChange,chong}=props
  return (
    <div>
      <Form
        name="basic"
        labelCol={{ span: 8 }}
        form={rest}
        layout="inline"
        wrapperCol={{ span: 16 }}
        style={{ maxWidth: 800 }}
        initialValues={{ remember: true }}
        onFinish={onFinish}
        onFinishFailed={onFinishFailed}
        autoComplete="off"
      >
        <Form.Item<FieldType> label="集合编号" name="id">
          <Input />
        </Form.Item>
        <Form.Item<FieldType> label="集合名称" name="title">
          <Input />
        </Form.Item>
        <Form.Item<FieldType> label="内容体载" name="content">
          <Select
            defaultValue="全部"
            style={{ width: 120 }}
            onChange={handleChange}
            options={[
              { value: "热热打车", label: "热热打车" },
              { value: "而已", label: "而已" },
            ]}
          />
        </Form.Item>
        <Form.Item<FieldType> label="筛选方式" name="content">
          <Select
            defaultValue="全部"
            style={{ width: 120 }}
            onChange={handleChange}
            options={[
                { value: "热热打车", label: "热热打车" },
                { value: "而已", label: "而已" },
            ]}
          />
        </Form.Item>
        <Form.Item<FieldType> label="日期">
          <RangePicker picker="week" />
        </Form.Item>
        <Form.Item<FieldType> label="状态" name="content">
          <Select
            defaultValue="全部"
            style={{ width: 120 }}
            onChange={handleChange}
            options={[
              { value: "已上线", label: "已上线" },
              { value: "已下线", label: "已下线" },
            ]}
          />
        </Form.Item>
        <Form.Item label={null}>
          <Button type="primary" htmlType="submit">
            <SearchOutlined /> 搜索
          </Button>
        </Form.Item>{" "}
        <br />
        <br />
        <Button onClick={chong}>
          <UndoOutlined /> 重置
        </Button>
      </Form>
    </div>
  )
}

export default Search
